/**
 * 外包人员信息 api 封装
 *
 * @Author:    zzw
 * @Date:      2024-09-23 10:25:33
 * @Copyright  jz
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const outsourcingPersonnelApi = {

  /**
   * 分页查询  @author  zzw
   */
  queryPage : (param) => {
    return postRequest('/outsourcingPersonnel/queryPage', param);
  },

  /**
   * 增加  @author  zzw
   */
  add: (param) => {
      return postRequest('/outsourcingPersonnel/add', param);
  },

  /**
   * 修改  @author  zzw
   */
  update: (param) => {
      return postRequest('/outsourcingPersonnel/update', param);
  },


  /**
   * 删除  @author  zzw
   */
  delete: (id) => {
      return getRequest(`/outsourcingPersonnel/delete/${id}`);
  },

  /**
   * 批量删除  @author  zzw
   */
  batchDelete: (idList) => {
      return postRequest('/outsourcingPersonnel/batchDelete', idList);
  },
  /**
   * 获取外包公司下拉  @author  zzw
   */
  queryAll: () => {
    return getRequest('/outsourcingCompany/queryAll');
  },
  
  /**
   * 获取所属班组  @author  zzw
   */
  getDepartment: (id) => {
    return getRequest(`/employee/getAllEmployeeByDepartmentId/${id}`);
  },
};
